<!--
 * @FilePath     : /study_code/css/nth-child-odd-even.html
 * @Description  : :nth-child(odd) 匹配奇数个 :nth-child(even) 匹配 偶数个
 * @Date         : 2025-04-27 09:37:57
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-27 09:37:57
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
    <style>
      li {
        width: 100px;
        height: 20px;
        margin: 10px;
        background: lightblue;
      }

      li:nth-child(odd) {
        background: red;
      }

      li:nth-child(even) {
        background: blue;
      }
    </style>
  </head>
  <body>
    <ul>
      <li></li>
      <li></li>
      <li></li>
      <li></li>
      <li></li>
      <li></li>
      <li></li>
      <li></li>
    </ul>
  </body>
</html>
